package com.zyylr.classroomreservationsystem.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;

import com.zyylr.classroomreservationsystem.R;

/**
 * A simple {@link Fragment} subclass.
 * Activities that contain this fragment must implement the
 * {@link ClassroomInformationFragment.OnFragmentInteractionListener} interface
 * to handle interaction events.
 * Use the {@link ClassroomInformationFragment#newInstance} factory method to
 * create an instance of this fragment.
 */
public class ClassroomInformationFragment extends Fragment {

    private TextView add_classroom;
    private TextView delete_classroom;


    public ClassroomInformationFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_classroom_information, container, false);
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);

        add_classroom = getActivity().findViewById(R.id.add_classroom);          //点击添加用户所要完成的事件
        add_classroom.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(getActivity(), "此处进行教室的添加", Toast.LENGTH_SHORT).show();
            }
        });

        delete_classroom = getActivity().findViewById(R.id.delete_classroom);     //点击删除用户所要完成的事件
        delete_classroom.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(getActivity(), "此处进行教室的删除", Toast.LENGTH_SHORT).show();
            }
        });

    }


}
